package com.wnhz.trim.common.result;

import lombok.Getter;


@Getter
public enum RespCode {
    SUCCESS(200, "ok"),
    ERROR(500, "服务器异常"),
    PARAM_IS_NULL(410, "请求必填参数为空"),
    PARAM_ERROR(400, "用户请求参数错误"),
    ACCESS_UNAUTHORIZED(301, "访问未授权"),
    USER_NOT_EXIST(201, "用户不存在"),
    USER_ACCOUNT_LOCKED(202, "用户账户被冻结"),
    USER_ACCOUNT_INVALID(203, "用户账户已作废"),
    USERNAME_OR_PASSWORD_ERROR(210, "用户名或密码错误"),
    CLIENT_AUTHENTICATION_FAILED(212, "客户端认证失败"),
    TOKEN_INVALID_OR_EXPIRED(230, "token无效或已过期"),
    TOKEN_ACCESS_FORBIDDEN(231, "token已被禁止访问"),
    RESOURCE_NOT_FOUND(404, "未找到接口异常");;

    private String msg;
    private int code;


    RespCode(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }
}
